package com.jsshse.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Pages {

	public Pages() {
		sortField="";
		sortOrder="";
		queryCondition="";
	}

	private Map queryParam = new HashMap();
	private String queryCondition="" ;
	private List dataList = new ArrayList();
	private String sortField;
	private String sortOrder;
	
	private int pageSize;
	private int pageStart;
	private int pageIndex;
	private int total;
 
	public String getAllQueryCond(){
		if(sortField==null){
			sortField="";
		}
		if(sortOrder==null){
			sortOrder="";
		}
		return  queryCondition+" "+(sortField.length()>0?" order by  "+sortField+" "+sortOrder:"");
	}
	public String getSortField() {
		return sortField;
	}

	public void setSortField(String sortField) {
		this.sortField = sortField;
	}

	public String getSortOrder() {
		return sortOrder;
	}

	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}

	public int getPageStart() {
		return pageStart;
	}

	public void setPageStart(int pageStart) {
		this.pageStart = pageStart;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public Map getQueryParam() {
		return queryParam;
	}

	public void setQueryParam(Map queryParam) {
		this.queryParam = queryParam;
	}

	public String getQueryCondition() {
		return queryCondition;
	}

	public void setQueryCondition(String queryCondition) {
		this.queryCondition = queryCondition;
	}

	public List getDataList() {
		return dataList;
	}

	public void setDataList(List dataList) {
		this.dataList = dataList;
	}

}
